<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let d=new Date
        // console.log(d.getFullYear())
        // console.log(d.getMonth())月是从0开始的
        // console.log(d.getDay())
        Date.prototype.dateFormate=function(){
            let year = this.getFullYear()
            let month =this.getMonth()
            let day =this.getDay()
            return `${year}年${month+1}月${day}日`
        }
        let d= new Date("1999-12-1")
        console.log(d.dateFormate())
    </script>
</body>
</html>